package xshen;

public class student extends perso{
    int no;

    double scoreMath ;

    double scoreEn;

    double scoreCh;

    public double aver(){
        return (scoreCh + scoreEn + scoreMath)/3;
    }
    public double max(){
        return Math.max(Math.max(scoreCh,scoreEn),scoreMath);
    }
    public double min(){
        return Math.min(Math.min(scoreMath,scoreCh),scoreEn);
    }

    @Override
    public String toString() {
        return "Student{" +
                ", 姓名 ='" + name + '\'' +
                ", 年龄 =" + age +
                ", 性别 ='" + sex + '\'' +
                "学号 =" + no +
                ", 数学成绩 =" + scoreMath +
                ", 英语成绩 =" + scoreEn +
                ", 语文成绩 =" + scoreCh +
                '}';
    }
}


